<html>
<head><meta charset="utf-8"><title>enable proc-macro and build-script in metrics · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html">enable proc-macro and build-script in metrics</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="233293115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233293115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Edwin Cheng <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233293115">(Apr 06 2021 at 09:51)</a>:</h4>
<p>I would like to enable proc-macro and build-script in metrics to match the default settings of RA. </p>
<p>Good idea or not ?</p>



<a name="233293224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233293224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233293224">(Apr 06 2021 at 09:52)</a>:</h4>
<p>I'm worried about practically losing the historical measurements</p>



<a name="233294893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233294893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233294893">(Apr 06 2021 at 10:07)</a>:</h4>
<p>I think loosing historical data is fine. We are mostly interested in last week perf, not in the long-term trends.</p>



<a name="233294912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233294912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233294912">(Apr 06 2021 at 10:07)</a>:</h4>
<p>We can always recrated historical data by going back in the git's history.</p>



<a name="233295495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233295495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233295495">(Apr 06 2021 at 10:13)</a>:</h4>
<p><span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span> </p>
<p>I now realize that, in general, if you want to observe historical perf trends, collecting a history of measurements in time is wrong, and instead it's more robust to re-create historical data. That way, you are protected from configuration changes (GitHub actions upgrading VMs)</p>



<a name="233295671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233295671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233295671">(Apr 06 2021 at 10:15)</a>:</h4>
<p>Of course, if you have your own <del>hardware</del> infra it's easier to keep it more consistent. I noticed that GHA has at least two different CPU types.</p>



<a name="233295858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233295858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233295858">(Apr 06 2021 at 10:17)</a>:</h4>
<div class="codehilite"><pre><span></span><code>$ git log --merges --oneline | wc -l
5042
</code></pre></div>
<p>That's gonna take a while.</p>



<a name="233296065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233296065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233296065">(Apr 06 2021 at 10:19)</a>:</h4>
<p><span class="user-mention" data-user-id="203546">@Laurențiu</span> that depends on how much history you want. Fun fact: the timing infrastructure in IntelliJ reports times in wall-clock machine independent format. That is, the measure is milliseconds, but they are multiplied by the "scaling factor": how much the current CPU is faster than a canonical CPU</p>



<a name="233296085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233296085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233296085">(Apr 06 2021 at 10:19)</a>:</h4>
<p>Canonical CPU is Pentium 4</p>



<a name="233296214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233296214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233296214">(Apr 06 2021 at 10:20)</a>:</h4>
<blockquote>
<p>That's gonna take a while.</p>
</blockquote>
<p>You probably don't want to sample the history linearly, and insterad want something more exponential, line 2, 4, 8, 16, 32, 64, 128, 256 commits back</p>



<a name="233296228"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233296228" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233296228">(Apr 06 2021 at 10:20)</a>:</h4>
<p>or some kind of adaptive sampling.</p>



<a name="233296230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/enable%20proc-macro%20and%20build-script%20in%20metrics/near/233296230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/enable.20proc-macro.20and.20build-script.20in.20metrics.html#233296230">(Apr 06 2021 at 10:21)</a>:</h4>
<p>And it's still slow <span aria-label="laughter tears" class="emoji emoji-1f602" role="img" title="laughter tears">:laughter_tears:</span> (sorry for the jab, somehow I never managed to like IntelliJ). But yeah, it's a sensible approach; I imagine it can have problems when you start adding and using more cores, Amdahl's law and all that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>